<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<form id="pagerForm" method="post" action="${base}/core/backupdata/list.do"  onsubmit="return ${targetType}Search(this);" >
	<input type="hidden" name="targetType" value="${targetType}">
	<input type="hidden" name="targetId" value="${targetId}">
    <input type="hidden" name="pageNum" value="${page.number}" />
	<input type="hidden" name="numPerPage" value="${page.size}" />
	<input type="hidden" name="orderField" id="orderField" value="${w:firstOrder(page.sort).property}" /> 
	<input type="hidden" name="orderDirection" id="orderDirection" value="${w:firstOrder(page.sort).direction}" />
<div class="pageHeader">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
					<td>
					备份名称： <input type="text" name="LIKE_backName" value="${LIKE_backName}"/>
				</td>
							<td><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></td>
			</tr>
		</table>
	</div>
</div>
</form>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${base}/core/backupdata/input.do?targetType=${targetType}&targetId=${targetId}"  target="navTab"  titile="机构类型"><span>新增</span></a></li>
			<li><a class="delete" href="${base}/core/backupdata/delete.do?targetType=${targetType}&targetId=${targetId}&id={sid}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="${base}/core/backupdata/input.do?targetType=${targetType}&targetId=${targetId}&id={sid}" target="navTab"><span>修改</span></a></li>
			<li><a class="icon" href="${base}/core/backupdata/upload.do?targetType=${targetType}&targetId=${targetId}" target="navTab"><span>上传</span></a></li>
		</ul>
	</div>
	
	<table class="table" width="100%" layoutH="115"  targetType="${targetType}" orderField="${w:firstOrder(page.sort).property}"  orderDirection="${w:firstOrder(page.sort).direction}">
		<thead>
			<tr>
				<th width="50">序号</th>
				<th orderField="backName">备份名称</th>
				<th orderField="filesize">文件大小</th>
				<th orderField="success">是否成功</th>
				<th orderField="createTime">备份时间</th>
					<th>操作</th>
				<c:if test="${targetType eq 'dialog'}">
				<th width="80">选择</th>
				</c:if>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${w:it(page)}" varStatus="status">
			<tr target="sid" rel="${item.id}">
			<td>${page.number*page.size+status.count}</td>
					<td>${item.backName}</td>
		       <td>${item.filesize}</td>
			<td> <w:code  type="yesno"  key="${item.success}"></w:code></td>
		        <td><fmt:formatDate  value="${item.createTime}" type="both"/></td>
		        <td> <a href="${base}/core/backupdata/restore.do?id=${item.id}" target="ajaxTodo" title="确定要恢复到此备份吗?">恢复</a>
		          &nbsp;  &nbsp; &nbsp;<a href="${base}/core/backupdata/down.do?id=${item.id}"  >下载</a>
		        </td>
			<c:if test="${targetType eq 'dialog'}">
		<td>	<a class="btnSelect" href="javascript:$.bringBack({id:'${item.id}',name:'${item.backName}'})" title="选择">选择</a>  </td>
		</c:if>
			</tr>
			</c:forEach>
					</tbody>
	</table>
 
<w:page page="${page}"></w:page>
</div>